1. Field of the Invention
The present invention relates to information processing systems and, more particularly, to tools and methods for monitoring, modeling, and enhancing system performance.
2. Description of Related Art
To enhance system performance, it is helpful to know which modules within a system are the most frequently executed. These most frequently executed modules are referred to as "hot" modules. Within these hot modules, it is also useful to know which lines of code are the most frequently executed. These frequently executed code segments are known as "hot spots."
A programmer hoping to improve system performance should focus his or her efforts on improving the performance of the hot modules and hot spots within those modules. Improving the performance of the most frequently executed modules and code segments will have the most effect on improving overall system performance. It does not make sense to spend much time improving the performance of modules or code segments which are rarely executed, as this will have little, if any, effect on the overall system performance.
Many modern processors contain hardware capability which allows performance data to be collected. For example, most modern processors have the capability to measure cycle time. Many modern processors also have the ability to count other items, such as cache misses, floating point operations, bus utilization, and translation look-aside buffer (TLB) misses. To count cache misses, for example, a bit or a sequence of bits within a status register is set to a predetermined code. This bit sequence tells the processor to increment a counter every time there is a cache miss. When the bit sequence is reset, the processor stops counting cache misses, and the total number of cache misses can be read from another register or from a memory area.
Prior art approaches to collecting hardware performance data have focused on collecting this data for a specified period of time. However, data collected in this way is not very useful. For example, knowing that there were 50,000 cache misses during a particular time period does not tell a programmer where to focus his or her efforts to improve this statistic. Knowing that a particular operation takes a certain amount of cycle time is also not very helpful without knowing the cycles per instruction of each of the hot modules within the system.
Consequently, there is a need for a method and tool for identifying the most frequently executed code segments within a software system, and then collecting useful hardware performance data regarding these particular code segments in a non-intrusive manner.